//
//  Resume.java
//  TopoManipApplet
//
//  Created by Thibaud PIQUET on 08/04/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

package src.convertisseur;
import java.util.*;

/**
 *
 * @author Thibaud PIQUET
 */
public class Resume {
	
    private Vector<String> res;
    private static Resume uniqueInstance;
	
    Resume(){
        this.res = new Vector<String>();
    }
	
    public static Resume getInstance () {
        if(uniqueInstance == null) {
            uniqueInstance = new Resume();
		}
		return uniqueInstance;
    }
    
    public void add(String classe, String s){
        this.res.add("["+classe+"] - "+s);
    }
	
    public String display(){
        String result = "";
		for(int i=0;i<res.size();i++){
			if(result.equals("")){
				result = res.get(i);
			}
			else{
				result = result+"\n"+res.get(i);				
			}
        }
		return result;
    }
	
    public void clean(){
        this.res=new Vector<String>();
    }
	
}
